package com.ebs.md.api;

/**
 * Revision Author:
 *  $File: //depot/MarketData/commons-md-api/MAIN/src/main/java/com/ebs/md/api/BasicSnapshot.java $
 *  $Revision: #1 $
 *  $DateTime: 2012/04/29 09:26:44 $
 *  $Change: 110636 $
 *  $Author: Arik.Sher $
 */

import java.util.Calendar;
import java.util.Collections;
import java.util.List;

public class BasicSnapshot<BE extends IBookEntry>
implements       ISnapshot<BE>
{
	protected IProduct product;
	protected Calendar time;
	protected BookSide bookSide;
	protected List<BE> entries;
	
	public BasicSnapshot(IProduct product, Calendar time, BookSide bookSide, List<BE> entries) {
		super();
		this.product = product;
		this.time    = time;
		this.bookSide = bookSide;
		this.entries = entries;
	}

	public BasicSnapshot(IProduct product, Calendar time, BookSide bookSide) {
		this(product, time, bookSide, Collections.EMPTY_LIST);
	}
	
	public List<BE> getEntries() {
		return entries;
	}

	public IProduct getProduct() {
		return product;
	}

	public BookSide getSide() {
		return bookSide;
	}

	public Calendar getTime() {
		return time;
	}

	public String toString() {
		return "BasicSnapshot ["
				+   "bookSide=" + bookSide 
				+ ", product=" + product 
				+ ", time=" + time 
//				+ ", entries=" + entries
				+ "]";
	}

}
